package com.example.m_kartupay;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;

public class PurchaseActivity extends Activity {
	Button btnPurchaseInvoice;
	String[] items = {"Shuttle & Travel", "Rent Car"};
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.purchase);	
		
		Spinner unitBisnis=(Spinner)findViewById(R.id.spunitbisnis);
		//unitBisnis.setOnItemSelectedListener((OnItemSelectedListener) this);
		
		ArrayAdapter<String> aa  = new ArrayAdapter<String>(this,
				android.R.layout.simple_spinner_item,items);
		aa.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
		unitBisnis.setAdapter(aa);
		
		btnPurchaseInvoice = (Button)findViewById(R.id.btnPurchaseScan);
	    btnPurchaseInvoice.setOnClickListener(new View.OnClickListener() {

			public void onClick(View view) {
								
				Intent purchaseInvoice =  new Intent(view.getContext(), PurchaseInvoiceActivity.class);
         	    startActivity(purchaseInvoice);

				// check for login response
			}
		});
	    
				
	}
	
}